import axios from "axios";

const service = axios.create({
  baseURL: "",
  timeout: 5000,
});

service.interceptors.request.use((config) => {
  config.headers["X-Token"] = localStorage.getItem("token");
  return config;
}
,(err)=>{
    return Promise.reject(err)
}
);
service.interceptors.response.use(
    (response)=>{
        return response.data;
    },
    (err)=>{
        return Promise.reject(err);
    }
);
export default service;

